package com.snail.common.dyd.impl;

import com.snail.common.dyd.DataSourceSwitcher;
import com.snail.common.dyd.bean.DataSourceInfo;
import com.snail.common.dyd.hepler.DataSourceHelper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;


@Slf4j
@Data
@AllArgsConstructor
public class DefaultDataSourceSwitcher implements DataSourceSwitcher {


    private DataSourceHelper dataSourceHelper;

    @Override
    public void switchDataSource(DataSourceInfo dataSourceInfoBean) {
        dataSourceHelper.changeDataSource(dataSourceInfoBean);
    }
}
